import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    redirect: '/login' // 根路径重定向到 /login
  },
  {
    path: '/hall',
    name: 'Hall',
    component: () => import('@/views/hall/HallView.vue'),
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/user/LoginView.vue')
  }, {
    path: '/room'
    , name: 'room',
    component: () => import('@/views/room/RoomView.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router